home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 673 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: uwm.edu!msunews!news
  2. From: Robert Foster <rkf@radiology.msu.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Passing C++ member functions to Xview notifier functions.
  5. Date: 5 Jan 1996 18:54:53 GMT
  6. Organization: Michigan State University, Radiology Dept., East Lansing, MI, USA
  7. Message-ID: <4cjs5t$13hb@msunews.cl.msu.edu>
  8. References: <4chhsn$sim@msunews.cl.msu.edu> <4cjfd6$16vn@locutus.rchland.ibm.com>
  9. NNTP-Posting-Host: dbserv.rad.msu.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (X11; I; SunOS 5.4 sun4m)
  14. X-URL: news:4cjfd6$16vn@locutus.rchland.ibm.com
  15.  
  16. > As the error message points out, the function notify_set_input_func is 
  17. > expecting a plain function pointer, not a pointer to a member function.
  18. > You can use either a plain function, or a static member function of the 
  19. > class.
  20.  
  21. I have tried both plain and static and still receive the error message.
  22. It appears that the compiler is complaining about the argument list and
  23. not the member function pointer. For example, I used _non-class member_
  24. functions and got...
  25.  
  26. Error: Formal argument func of type notify_value(*)(...) in call to
  27. notify_set_input_func(unsigned long, notify_value(*)(...), int) is
  28. being passed notify_value(*)(unsigned long, int).
  29.  
  30. Where before, with the class member function I got...
  31.  
  32. Error: Formal argument func of type notify_value(*)(...) in call to
  33. notify_set_input_func(unsigned long, notify_value(*)(...), int) is
  34. being passed notify_value(Pipe::*)(unsigned long, int).
  35.  
  36. It seems that there is another problem involving the argument list?
  37. In this case I am calling...
  38.  
  39. notify_set_input_func( client1, read_from, pipe_in_out[1][0] ) ;
  40.  
  41. from within a class member function that is part of the same class which
  42. contains the _read_from_ class member function. An instance of this
  43. class object would include all of the member functions, right?
  44.  
  45.